package com.esint.validation.entity.car;

import lombok.Builder;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.time.LocalDate;

/**
 * @description: 汽车类
 * @author: 谷明
 * @createDate: 2021/8/12 18:27
 */
//@Builder
@Data
public class Car {

    @Past(message = "车辆的出厂日期不能大于当前时间")
    private LocalDate productDate;

    //三层嵌套对象的校验+自定义校验器
    @Valid
    @NotNull
    private Engine engine;
//    private OutsideShell outsideShell;
//    private Seats seats;
//    private SteeringWheel steeringWheel;
//    private Territory territory;
//    private Wheels wheels;
}
